﻿@using BonjourQuotation.UI.Models.AccountModel
@model ManageUsersGridViewModel
<div style="width:1021px; min-height:300px; max-height:442px; margin:auto; padding-top:30px; padding-bottom:30px; ">
    <table class="table table-bordered table-hover table-condensed" style="margin-bottom: -1px !important; width: 1000px;background-color:white;">
        <thead>
            <tr>
                <th width="40%;" class="GridHeaders">User Name</th>
                <th width="15%;" class="GridHeaders">Role</th>
                <th width="10%;" class="GridHeaders">Details</th>
                <th width="15%;" class="GridHeaders">Permissions</th>
                <th width="10%;" class="GridHeaders">Edit</th>
                <th width="10%;" class="GridHeaders">Delete</th>
            </tr>
        </thead>
    </table>
    <div style="height:350px; overflow-y:auto;">
        <table class="table table-bordered table-hover table-condensed" style="width: 1000px; table-layout: fixed; background-color: white;">
            <tbody>
                @for (int ind = 0; ind < Model.Rows.Count; ind++)
                {
                    @Html.HiddenFor(model => model.Rows[ind].UserID)
                    <tr>
                        <td width="40%;">@Html.LabelForModel(Model.Rows[ind].UserName, new { @class = "table_inputs_400", @style = "text-align: left" })</td>
                        <td width="15%;">@Html.LabelForModel(Model.Rows[ind].Role, new { @class = "table_inputs_150", @style = "text-align: left" })</td>
                        <td width="10%;" style="text-align:center"><button class="btn14 btn60 btnheight22" type="button" onclick="ShowUserDetails('@Model.Rows[ind].EmployeeID')">Details</button></td>
                        @if (Model.MenuManageEmployeeEdit)
                        {
                            <td width="15%;" style="text-align:center"><button class="btn14 btn90 btnheight22" type="button" onclick="ShowToolTabColumnPermissionsAll('@Model.Rows[ind].UserID')">Permissions</button></td>
                            <td width="10%;" style="text-align:center"><button class="btn14 btn60 btnheight22" type="button" onclick="location.href = '/Account/EditUser?UserId=@Model.Rows[ind].UserID'">Edit</button></td>
                            <td width="10%;" style="text-align:center"><button class="btn14 btn-danger btn60 btnheight22" id="DeleteUser" type="button" onclick=DeleteUser(@Model.Rows[ind].UserID)>Delete</button></td>
                        }
                        else
                        {
                            <td width="15%;" style="text-align:center"><button class="btn14 btn90 btnheight22" type="button" disabled="disabled" onclick="ShowToolTabColumnPermissionsAll('@Model.Rows[ind].UserID')">Permissions</button></td>
                            <td width="10%;" style="text-align:center"><button class="btn14 btn60 btnheight22" type="button" disabled="disabled" onclick="location.href = '/Account/EditUser?UserId=@Model.Rows[ind].UserID'">Edit</button></td>
                            <td width="10%;" style="text-align:center"><button class="btn14 btn-danger btn60 btnheight22" disabled="disabled" id="DeleteUser" type="button" onclick=DeleteUser(@Model.Rows[ind].UserID)>Delete</button></td>
                        }
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>











  










